package com.example.administrator.netchess;

import java.io.PrintWriter;

public class SendDataThread extends Thread{

    private PrintWriter pw = null;
    private String data = null;

    public SendDataThread (PrintWriter pw,String data){
        this.pw = pw;
        this.data = data;

    }

    @Override
    public void run() {
        super.run();

        if (null!=pw){
            System.out.println("--sendToServer"+data.toString());
            pw.println(data);
            pw.flush();

        }

    }
}
